home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Applications / POV-Ray 3.0.2 / Scenes / QuickTime VR! / QTVRObject.pov next >
Encoding:
Text File  |  1997-02-04  |  6.6 KB  |  272 lines  |  [TEXT/POV3]

  1. // Persistence of Vision Ray Tracer Scene Description File
  2. // File: QTVRObject.pov
  3. // Vers: 3
  4. // Desc: Example of how to make a QTVR Object movie, NOT YET WORKING!!!
  5. //       Animation Settings in Prefs dialog:
  6. //         Frame: -,1,200,200
  7. //         Clock: 1,-,-,1
  8. //       NOTE:
  9. //         This code currently assumes 200 total frames,
  10. //         as we circle the object in 20 Long_Steps (longitude lines, 360 deg.),
  11. //         and we take 10 Lat_Steps from top pole to bottom pole (lat. lines, 180 deg.)
  12. //       How to convert:
  13. //         (0) Render all frames with POV-Ray
  14. //         (1) convert PICTs to QuickTime movie using MooVer or equiv.
  15. //         (2) Convert to QT Object movie using Apple's "Make QTVR Object" utility 
  16. // Date: 2/97
  17. // Auth: Kent Oberheu, modified by Eduard Schwan.
  18.  
  19. // ----------------------------------------------
  20. // Set this line to 1 to do Kent's nice (slow) area lighting of the subject
  21.   #declare DO_COMPLEX_LIGHTING = 0
  22.  
  23. // ----------------------------------------------
  24. // The product of Lat_Steps x Long_Steps must be equal to the Final Frame value
  25. // *** YOU CAN CHANGE THESE NEXT TWO VALUES,
  26. // *** BUT FINAL_FRAME MUST MATCH WHAT YOU SET
  27. // *** IN THE PREFERENCES DIALOG (ANIMATION SETTINGS)
  28.   #declare Lat_Steps    =  10   // # of vertical steps
  29.   #declare Long_Steps   =  20   // # of longitudinal steps
  30.   #declare Final_Frame  = Lat_Steps*Long_Steps  // # of frames in movie
  31.   #declare Long_Max = 360  // total of 360 degrees around object
  32.   #declare Lat_Max = 180  // total of 180 degrees from top pole to bottom pole
  33.  
  34. // Long_Pos does a multiple repeating (sawtooth) increment from 0.0 to 360 (degrees)
  35. // around the object
  36.   #declare Long_Pos = Long_Max*( clock*Long_Steps - (int(clock*Long_Steps)) )
  37.  
  38. // Lat_Pos does an integral step function down the object, changing once every
  39. // time Long_Pos does a full 360 degree rotation.
  40.   #declare Lat_Pos = Lat_Max*( int(clock*Lat_Steps)/Lat_Steps )
  41.  
  42.  
  43. // ----------------------------------------------
  44. #version 3.0
  45.  
  46. global_settings
  47. {
  48.   assumed_gamma 2.2
  49. }
  50.  
  51.  
  52. // ----------------------------------------------
  53. camera
  54. {
  55.     perspective
  56.     location  <0,0,-14>
  57.     up        <0,1,0>
  58.     right     <1,0,0>
  59.     look_at   <0,0,0>
  60.     angle 50
  61. }
  62.  
  63. // ----------------------------------------------
  64. #if (DO_COMPLEX_LIGHTING)
  65. // The Area Light
  66. light_source
  67. {
  68.     <5,10,-7.5>*1
  69.     color <1,1,1>*.65
  70.     spotlight
  71.     point_at <0,0,0>
  72.     radius 40
  73.     falloff 100
  74.     tightness 1
  75.     area_light <-2,0,0>, <0,0,2>, 1, 1
  76.     adaptive 10
  77.     jitter
  78.     rotate <0,0,0>
  79.     //shadowless
  80. }
  81. #end
  82.  
  83. #declare LIGHT_INTENSITY = 0.5
  84. light_source { <-7,13,-25>*4    color rgb <1, 0, 0>*LIGHT_INTENSITY shadowless } // R
  85. light_source { <-10,10,-20>*4   color rgb <0, 1, 0>*LIGHT_INTENSITY shadowless } // G
  86. light_source { <-13,7,-17>*4    color rgb <0, 0, 1>*LIGHT_INTENSITY shadowless } // B
  87. light_source { <2.5,-10,-2.5>*4 color rgb <.4,.7,1>*LIGHT_INTENSITY shadowless } // Blue Back light
  88.  
  89. // ----------------------------------------------
  90. background { color rgb <.4,.1,.1> }
  91.  
  92. #declare SphereTex = texture
  93. {
  94.     pigment { color rgbft <1,.6,.5,0,0> }
  95.     finish
  96.     {
  97.       diffuse .3
  98.       ambient <.1,.13,.17>
  99.       phong 0
  100.     }
  101. }
  102.  
  103. sphere
  104. {
  105.     <0,0,0>, 20 // outside the camera
  106.     texture { SphereTex }
  107.     hollow
  108.     no_shadow
  109. }
  110.  
  111.  
  112. // ----------------------------------------------
  113. #declare NewTex = texture
  114. {
  115.    pigment { color rgbft <1,1,1,0,0> }
  116.    finish
  117.    {
  118.       diffuse .9
  119.       ambient <.1,.1,.1>
  120.       phong 0
  121.       specular 0
  122.       roughness 1
  123.       reflection 0
  124.       refraction 0
  125.       ior 1
  126.     }
  127. }
  128.  
  129.  
  130.  
  131. // ----------------------------------------------
  132. /*
  133. *************************************************
  134.  
  135.     The following are code clippets for some way cool julia sets.
  136.     Note the declared values "One", "Two", "Three", and "Four"
  137.     are for the quaternion equation in their respective order. -ko 7.24.96
  138.  
  139.  
  140.   #declare ReGen = 7
  141.  
  142.   #declare Cycle1 = ReGen/5
  143.   #declare Cycle2 = ReGen/11
  144.   #declare Cycle3 = ReGen/20
  145.   #declare Cycle4 = ReGen/15
  146.  
  147.  
  148. // this one is kind of like a mummy slug w/out the slug -ko 7.24.96
  149.   #declare One = .1  // .187294 original cool value
  150.   #declare Two = 1  //  .244339 original cool value
  151.   #declare Three = .765043  // .765043 original cool value
  152.   #declare Four = .0765811  // .0765811 original cool value
  153. // max_iteration 9
  154.  
  155. // The mummy slug w/ the shroud still intact -ko 7.24.96
  156.   #declare One = .05
  157.   #declare Two = .5
  158.   #declare Three = .765043
  159.   #declare Four = .0765811
  160. // max_iteration 9
  161.  
  162.  
  163. // Ginger Root -ko 7.24.96
  164.   #declare One = .075
  165.   #declare Two = .75
  166.   #declare Three = -.765043
  167.   #declare Four = -.0765811
  168. // max_iteration 9
  169.  
  170.  
  171. // Nice elongated paint strokes
  172.   #declare One = .11
  173.   #declare Two = 1.1
  174.   #declare Three = .65
  175.   #declare Four = .065
  176. // max_iteration 7
  177.  
  178.  
  179. // Very nice shroud shaped thingy - ko 7.24.96
  180.   #declare One = .125
  181.   #declare Two = 1.25
  182.   #declare Three = .35
  183.   #declare Four = .035
  184. // max_iteration 7
  185.  
  186.  
  187. // Way Cool Slug Thing!!!!! -ko 7.24.96
  188.   #declare One = .05    // stretches out the neck
  189.   #declare Two = .5        // keep at 1/10th of the value for "One"
  190.   #declare Three = 1      // Defines the curve of the bottom of the slugs butt
  191.                         // including the definition of the antennae
  192.   #declare Four = .1    // keep at 1/10th of the value for "Three"
  193. // max_iteration 9
  194.  
  195.  
  196. // Lightening preserved in Sand -ko 7.24.96
  197.  
  198.   #declare One = .25
  199.   #declare Two = .5
  200.   #declare Three = 1
  201.   #declare Four = .5
  202. // max_iteration 9
  203.  
  204.  
  205. // Snake from the vortex! -ko 7.24.96
  206.   #declare One = .25
  207.   #declare Two = .375
  208.   #declare Three = .75
  209.   #declare Four = .5
  210. // max_iteration 9
  211.  
  212.  
  213. // Handle on a Pot? Maybe a liquid pouring -ko 7.24.96
  214.   #declare One = .25
  215.   #declare Two = .125
  216.   #declare Three = 1
  217.   #declare Four = .5
  218. // max_iteration 9
  219.  
  220.  
  221. *************************************************
  222. */
  223.  
  224.  
  225. // ----------------------------------------------
  226.  
  227.   #declare One = .25
  228.   #declare Two = .375
  229.   #declare Three = .75
  230.   #declare Four = .5
  231.  
  232. // original
  233. //  #declare One = .11
  234. //  #declare Two = .6
  235. //  #declare Three = 1
  236. //  #declare Four = .1
  237.  
  238. #declare BlobbyFract = 
  239. julia_fractal
  240. {
  241.         //<.5,-.2,.8,.6>
  242.         <One,Two,Three,Four>
  243.         quaternion
  244.         cube
  245.         max_iteration 9
  246.         precision 5000
  247.         //slice <0,0,0,1>,0
  248.     texture { NewTex }
  249.      scale 4.25
  250.      //clipped_by {box{ <-10,-.125,-10> <10,.125,10> rotate <0,0,60> translate <0,0,0>}}
  251.      //bounded_by { clipped_by }
  252.      rotate <290,0,0>
  253.      rotate <0,560,0>
  254.      rotate <0,0,840>
  255.      translate <0,-1.075,0>
  256.      scale 1.05
  257.      hollow
  258. }
  259.  
  260. // ----------------------------------------------
  261. // The actual object  interest goes here
  262. object
  263. {
  264.     BlobbyFract
  265.     translate <0,0,0> 
  266.     rotate <0,Long_Pos,0>    // spin on Y axis
  267.     rotate <-90,0,0>         // now spin top toward viewer
  268.     rotate <Lat_Pos,0,0>     // spin on X axis
  269. }
  270.  
  271.  
  272.